home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / fredfish / 901-910 / ff907 / cyberpager / source / source.lha / library / smakefile < prev    next >
Encoding:
Makefile  |  1993-06-17  |  2.7 KB  |  103 lines

  1. # smakefile for pager-support.library
  2. # Copyright © 1993 by Christopher A. Wichura (caw@miroc.chi.il.us)
  3. # All rights reserved.
  4.  
  5. TARGETBASE = pager-support-debug
  6. DEBUGVER = 1    # never use anything other than 0 or 1 for DEBUGVER!
  7.  
  8. HDR = pager-lib.gst
  9. CFLAGS = nostkchk strmerge parms=reg gstimm utillib
  10. LFLAGS = smallcode smalldata
  11.  
  12. TARGET = $(TARGETBASE).library
  13. MAPFILE = $(TARGETBASE).map
  14.  
  15. OFILE = .o$(DEBUGVER)
  16.  
  17. OBJ2 = LibHandler$(OFILE) handleResource$(OFILE) log$(OFILE) lockFile$(OFILE) services$(OFILE) aliases$(OFILE) sequence$(OFILE) spool$(OFILE) config$(OFILE)
  18. OBJS = LibHead$(OFILE) $(OBJ2)
  19.  
  20. LIBS = LIB:amiga.lib LIB:sc.lib LIB:debug.lib
  21.  
  22. # we use two default rules for compiling the c files.  this makes it easier
  23. # to have separate compiler options for the debug and non-debug versions
  24. # of the library.
  25.  
  26. .c.o0:
  27.     sc $(CFLAGS) gst=$(HDR) optimize objname $*.o0 $*
  28.  
  29. .c.o1:
  30.     Indent $*.c
  31.     sc $(CFLAGS) gst=$(HDR) debug=symbolflush objname $*.o1 $*
  32.  
  33. $(TARGET): $(OBJS) smakefile
  34.     slink with lib:utillib.with <with < (withfile.lnk)
  35. FROM $(OBJS)
  36. TO $(TARGET)
  37. LIB $(LIBS)
  38. $(LFLAGS)
  39. ADDSYM
  40. MAP $(MAPFILE) fhlsx plain
  41. <
  42.  
  43. # build and install a release version of the library
  44. release:
  45.     smake pragmas
  46.     smake
  47.     smake install
  48.     smake TARGETBASE=pager-support DEBUGVER=0
  49.     smake TARGETBASE=pager-support DEBUGVER=0 install
  50.  
  51. # install the library in pager:libs.  we strip the debug info out of it when
  52. # we do this.
  53. install:
  54.     slink from $(TARGET) to pager:libs/$(TARGET) stripdebug noicons
  55.     protect pager:libs/$(TARGET) -e
  56.     removelib $(TARGET)
  57.  
  58. # delete object files, etc.
  59. clean:
  60.     delete $(HDR) \#?$(OFILE) \#?.c! $(MAPFILE)
  61.  
  62. # build the pragmas file.
  63. pragmas:
  64.     fd2pragma pager-support_lib.fd /include/pragmas/pager-support_lib.h
  65.     rx MakeTagcall /include/pragmas/pager-support_lib.h
  66.  
  67. # build the gst header file
  68. $(HDR): GSTMaker.c GSTMaker.h smakefile
  69.     sc $(CFLAGS) noobjname makegst=$(HDR) GSTMaker
  70.  
  71. # we have explicit entries for the two versions of LibHead (debug and
  72. # non-debug) we make.  the non-debug will automatically update the
  73. # revision number when it is called while the debug version does not
  74. # increment the revision number
  75.  
  76. LibHead.o0: LibHead.a version.i $(OBJ2)
  77.     UpAVersion version.i
  78.     hx68 from $*.a to $*.o0 incdir INCLUDE: addsym debug define BUILD_DEBUG=0
  79.  
  80. LibHead.o1: LibHead.a version.i $(OBJ2)
  81.     hx68 from $*.a to $*.o1 incdir INCLUDE: addsym debug define BUILD_DEBUG=1
  82.  
  83. # dependancies for the various source files
  84.  
  85. LibHandler$(OFILE): LibHandler.c $(HDR)
  86.  
  87. handleResource$(OFILE): handleResource.c $(HDR) memory.h
  88.  
  89. log$(OFILE): log.c $(HDR)
  90.  
  91. lockFile$(OFILE): lockFile.c $(HDR) memory.h
  92.  
  93. services$(OFILE): services.c $(HDR) memory.h
  94.  
  95. aliases$(OFILE): aliases.c $(HDR) memory.h
  96.  
  97. sequence$(OFILE): sequence.c $(HDR)
  98.  
  99. spool$(OFILE): spool.c $(HDR) memory.h
  100.  
  101. config$(OFILE): config.c $(HDR) memory.h
  102.  
  103.